<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="?colorSecondary"
    tools:context=".presentation.general.fragment.GeneralFragment"
    xmlns:app="http://schemas.android.com/apk/res-auto">

    <androidx.appcompat.widget.Toolbar
        android:id="@+id/appbar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHorizontal_bias="1.0"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:title="Поиск вакансий"
        style="@style/toolbarTitle">

        <ImageView
            android:id="@+id/filterImageView"
            android:layout_width="@dimen/dimen_24dp"
            android:layout_height="@dimen/dimen_24dp"
            android:layout_gravity="end"
            android:layout_margin="@dimen/dimen_12dp"
            android:src="@drawable/ic_filter" />
    </androidx.appcompat.widget.Toolbar>

    <com.google.android.material.textfield.TextInputEditText
        android:id="@+id/search_edit_text"
        style="@style/inputTextEditStyleDayNight"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_marginHorizontal="@dimen/dimen_16dp"
        android:layout_marginVertical="@dimen/dimen_8dp"
        android:drawableEnd="@drawable/ic_search"
        android:hint="@string/insert_request"
        android:padding="@dimen/dimen_16dp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/appbar" />
    <Button
        android:id="@+id/clear_button"
        android:layout_width="@dimen/big_size"
        android:layout_height="@dimen/big_size"
        android:layout_marginTop="@dimen/dimen_8dp"
        android:layout_marginEnd="@dimen/dimen_8dp"
        android:layout_marginBottom="@dimen/dimen_8dp"
        app:layout_constraintBottom_toBottomOf="@+id/search_edit_text"
        app:layout_constraintEnd_toEndOf="@+id/search_edit_text"
        app:layout_constraintTop_toTopOf="@+id/search_edit_text"
        android:alpha="0"
        android:enabled="false" />

    <androidx.recyclerview.widget.RecyclerView
        android:id="@+id/vacancies_rv"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/search_edit_text"
        android:layout_marginHorizontal="@dimen/dimen_16dp"
        android:layout_marginTop="@dimen/dimen_8dp"
        android:clipToPadding="false"
        android:paddingBottom="50dp"
        tools:listitem="@layout/vacancy_item"
        tools:visibility="visible" />

    <ProgressBar
        android:id="@+id/vacancies_progress"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        android:indeterminateTint="@color/Blue_yp"
        android:visibility="gone"/>

    <ProgressBar
        android:id="@+id/vacancies_loading"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/search_edit_text"
        android:indeterminateTint="@color/Blue_yp"
        android:visibility="gone"/>

    <androidx.cardview.widget.CardView
        android:id="@+id/found_count"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="@dimen/dimen_16dp"
        android:layout_marginTop="@dimen/dimen_8dp"
        android:layout_marginEnd="@dimen/dimen_16dp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/search_edit_text"
        app:cardCornerRadius="@dimen/dimen_8dp"
        >
        <TextView
            android:id="@+id/found_count_text"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:padding="4dp"
            android:background="@color/Blue_yp"
            android:textColor="@color/white"
            android:text="@string/found_count" />
    </androidx.cardview.widget.CardView>

    <LinearLayout
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginHorizontal="@dimen/dimen_16dp"
        android:layout_marginVertical="@dimen/dimen_32dp"
        android:orientation="vertical"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/found_count">

        <ImageView
            android:id="@+id/src"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:src="@drawable/state_image_start_search" />

        <TextView
            android:id="@+id/src_text"
            style="@style/TitleTextStyle"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:textAlignment="center"
            android:text=""
            android:textColor="@color/BlackDay_WhiteNight"
            tools:text="@string/no_vacancies"/>
    </LinearLayout>


</androidx.constraintlayout.widget.ConstraintLayout>
